<template>
  <div>
    <button @click="increment">{{ counter }}</button>
  </div>
</template>

<script>
import { ref, onMounted, onUpdated, onUnmounted } from "vue";

export default {
  setup() {
    const counter = ref(0);

    const increment = () => {
      counter.value++;
    };

    onMounted(() => {
      console.log("App mounted");
    });
    onUpdated(() => {
      console.log("App updated");
    });
    onUnmounted(() => {
      console.log("App unmounted");
    });

    return { counter, increment };
  },
};
</script>

<style scoped></style>
